<?php	if (! defined ( 'BASEPATH' )) exit ( 'No direct script access allowed' );

class Articles_model extends MY_Model{
	
	private $categoryTable;
	//配置端
	public function __construct(){
		parent::__construct();
		//连接数据库
		$this->setTableName('u_m_articles');
		$this->categoryTable = $this->db->dbprefix('u_c_articles_category');
	}
	
	public function search($what,$where,$order,$limit){
		return $this->select("*",'1=1',$order,$limit);
	}
	
	public function articlesClick($id){
		$sql = 'UPDATE'.$this->table.'SET articles_click=articles_click+1 WHERE id='.$id;
		return $this->db->query($sql);
	}
}
?>